package com.yhsoft.buyer.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 地址
 * </p>
 *
 * @author yyyyyyyh
 * @since 2023-09-26
 */
@TableName("buyer_address")
@Data
public class BuyerAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("收货人名称")
    private String name;

    @ApiModelProperty("用户表的用户ID")
    private String userId;

    @ApiModelProperty("行政区域表的省ID")
    private Integer provinceId;

    @ApiModelProperty("行政区域表的市ID")
    private Integer cityId;

    @ApiModelProperty("行政区域表的区县ID")
    private Integer areaId;

    @ApiModelProperty("具体收货地址")
    private String address;

    @ApiModelProperty("手机号码")
    private String mobile;

    @ApiModelProperty("是否默认地址 0:否;1:是")
    private Integer isDefault;

    @ApiModelProperty("是否展示 0:否;1:是")
    private Integer isShow;

    @ApiModelProperty("orderId")
    private String orderId;

    @ApiModelProperty("创建人")
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private LocalDateTime updatedTime;

    @ApiModelProperty("逻辑删除 0:未删除 1：已删除")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;


}
